#ifndef PAGEINTERFACE_H
#define PAGEINTERFACE_H

#include <QWidget>
#include <QPushButton>
#include <QTableWidget>
#include <QSignalMapper>
#include "global_def.h"
#include "globalconfig.h"

namespace Ui {
class PageInterface;
}

class PageInterface : public QWidget
{
    Q_OBJECT

public:
    explicit PageInterface(QWidget *parent = nullptr);
    ~PageInterface();
    void updateTableValue(int id, int value);
private:
    Ui::PageInterface *ui;

private slots:
    void slotBtnClicked(int index);
    void on_prevBtn_clicked();
    void on_nextBtn_clicked();
    void on_Btn_Return_clicked();
signals:
    void returnToMaintMenu();
private:
    QList<QTableWidget*> tablelist;
    QList<QPushButton*> btnlist;
    int tableIndex;
    QList<int> totalpage;
    QStringList pinlist[7], namelist[7];
    static const int tableRowCount = 11;
    static const int tableColumnCount = 8;
    void initTable();
    void updateTablePage();
};

#endif // PAGEINTERFACE_H
